package de.gwtprime.shared.requestFactory.request;

import java.util.List;

import com.google.web.bindery.requestfactory.shared.InstanceRequest;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;

import de.gwtprime.server.model.MyServiceLocator;
import de.gwtprime.server.model.Order;
import de.gwtprime.shared.requestFactory.OrderProxy;
import de.gwtprime.shared.requestFactory.User2Proxy;

@Service(value = Order.class, locator = MyServiceLocator.class)
public interface OrderRequest extends RequestContext {

	Request<OrderProxy> findOrder(Long id);
	Request<List<OrderProxy>> loadOrders();
	Request<List<OrderProxy>> loadOrders(User2Proxy user);
	InstanceRequest<OrderProxy, Long> persist();
	InstanceRequest<OrderProxy, Long> createNewOrder();
	
	
	InstanceRequest<OrderProxy, Void> stornoTheOrder();
	InstanceRequest<OrderProxy, Void> paymentTriggered();
	InstanceRequest<OrderProxy, Void> processOrder();
	InstanceRequest<OrderProxy, Void> remove();
	Request<Void> addOrder(OrderProxy order);
	InstanceRequest<OrderProxy, Void> paymentReceived();
	
}
